package com.youlemall.sellergoods.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.youlemall.mapper.SpecificationOptionMapper;
import com.youlemall.pojo.SpecificationOption;
import com.youlemall.service.SpecificationOptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;
import java.util.List;

/**
 * 规格选项实现接口
 * 2 * @Author: kevin
 * 3 * @Date: 2019/7/15 11:32
 * 4
 */
@Service
@Transactional
public class SpecificationOptionServiceImpl implements SpecificationOptionService {
	@Autowired
	private SpecificationOptionMapper specificationOptionMapper;

	@Override
	public void save(SpecificationOption specificationOption) {

	}

	@Override
	public void update(SpecificationOption specificationOption) {

	}

	@Override
	public void delete(Serializable id) {

	}

	@Override
	public void deleteAll(Serializable[] ids) {

	}

	@Override
	public SpecificationOption findOne(Serializable id) {
		return null;
	}

	@Override
	public List<SpecificationOption> findAll() {
		return null;
	}

	@Override
	public List<SpecificationOption> findByPage(SpecificationOption specificationOption, int page, int rows) {
		return null;
	}

	@Override
	public List<SpecificationOption> findSpeOptions(Long id) {
		try {
			SpecificationOption so =new SpecificationOption();
			so.setSpecId(id);
			List<SpecificationOption> list = specificationOptionMapper.select(so);
			return list;
		} catch (Exception e) {
			throw  new RuntimeException(e);
		}
	}
}
